

public class Test {
public static void main(String[] args) {
	Student stu2=new Student(1902, "小明", 18, "男","2000-12-12");
	stu2.display();
	stu2.modify();
}

}
class Student {
int sname;//用户名
String name;
int age;
String sex;
String date;//出生年月
public Student(int i, String name, int age, String sex, String string) {
	super();
	this.sname = i;
	this.name = name;
	this.age = age;
	this.sex = sex;
	this.date = string;
}

public Student() {
	super();
}


public void display() {
	System.out.println("用户名："+this.sname+" 大家好，我是"+this.name+",年龄"+this.age+",性别"+this.sex+",出生日期"+this.date);
}
public void modify() {
	Student stu2=new Student();
	stu2.name="张三";
	System.out.println("用户名："+this.sname+" 大家好，我是"+stu2.name+",年龄"+this.age+",性别"+this.sex+",出生日期"+this.date);
}
}